<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<title></title>
	</head>
	<body>
		
		<div>
			<lable>
				<span>120</span>
				<span>121</span>
			</lable>
			<span>110</span>
			<span>111</span>
		</div>
	</body>
	
	<script type="text/javascript" src="../../js/jquery-1.7.2.js" ></script>
	<script>
		$(function(){
			//包括它的孙子... 只要是后代就行
			var spans1 =$('div span');
			console.log(spans1.length);
			
			for(var index=0; index<spans1.length;index++){
				var data = spans1[index];
			}
			//重点  在jQuery中怎么用高级的循环 常用 此处的data是js对象
			spans1.each(function(index,data){
				var v ='%c'+data.innerText;
				console.log(v,'color:red');
			});
			var spans2=$('div>span');
			console.log(spans2.length);
			spans2.each(function(i,d){
				console.log(i +"\t:\n\r"+ d.innerText);
			});
		});
	</script>
</html>
